
/**
 * @brief    Defines the relation between a connectivity property and design
 * variables.
 *
 * @version  0.1
 * @author   wuxingchuang
 * @date     2025.04.11
 *          _
 *      ___| |__   ___ _ __   __ _  ___  _ __   __ _
 *     / __| '_ \ / _ \ '_ \ / _` |/ _ \| '_ \ / _` |
 *     \__ \ | | |  __/ | | | (_| | (_) | | | | (_| |
 *     |___/_| |_|\___|_| |_|\__, |\___/|_| |_|\__, |
 *                           |___/             |___/
 * @copyright (c) 2024 by 神工仿真, All Rights Reserved.
 */
#pragma once
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Input/Design/DesignBase.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN

struct DVCREL1Data : public DesignBase {
  struct TERMSData {
    SG::DataStructure::Common::Id m_DVID =
        0;  ///< DESVAR entry identification number
    SG::DataStructure::Common::Real m_COEF =
        0.0;  ///< Coeffcient of linear relation
  };

  char m_TYPE[8] = {0};                     ///< Name of connectivity entry
  SG::DataStructure::Common::Id m_eId = 0;  ///< Element identification number
  SG::DataStructure::Common::Id m_FID = 0;  ///< ????
  SG::DataStructure::Common::Real m_CPMIN =
      0.0;  ///< Minimum value allowed for this property
  SG::DataStructure::Common::Real m_CPMAX =
      0.0;  ///< Maximum value allowed for this property
  SG::DataStructure::Common::Real m_C0 = 0.0;  ///< Constant term of relation
  char m_CPNAME[8] = {0};  ///< Name of connectivity property
  SG::DataStructure::Common::Id m_domainId = 0;  ///<

  std::vector<TERMSData> m_TERMSList;
};

///@{ @brief operator override
DECLSPEC bool operator==(const DVCREL1Data::TERMSData& val1,
                         const DVCREL1Data::TERMSData& val2);

DECLSPEC bool operator==(const DVCREL1Data& val1, const DVCREL1Data& val2);
///}@
SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE
